#list
print("list-"*15)
def f1(my_list):
    print(f"②f1() my_list:{my_list}地址是:{id(my_list)}")
    my_list[0] = "jack"
    print(f"③f1()my_list:{my_list}地址是:{id(my_list)}")

#测试
my_list = ["tom" , "mary" , "hsp"]
print(f"①f1()my_list:{my_list}地址是:{id(my_list)}")
#调用函数
f1(my_list)
print(f"④f1()my_list:{my_list}地址是:{id(my_list)}")


print("tuple-"*15)
def f2(my_tuple):
    print(f"②f2() my_tuple:{my_tuple}地址是:{id(my_tuple)}")
    #元组是不支持修改的
    # my_tuple[0] = "red"
    print(f"③f2()my_tuple:{my_tuple}地址是:{id(my_tuple)}")

#测试
my_tuple = ("hi" , "ok" , "hello")
#测试
print(f"①f2()my_tuple:{my_tuple}地址是:{id(my_tuple)}")
#调用函数
f2(my_tuple)
print(f"④f2()my_tuple:{my_tuple}地址是:{id(my_tuple)}")


print("set-"*15)
def f3(my_set):
    print(f"②f3() my_set:{my_set}地址是:{id(my_set)}")
    #添加数据
    my_set.add("<红楼梦>")
    print(f"③f3()my_set:{my_set}地址是:{id(my_set)}")

#测试
my_set = {"水浒" , "西游" , "三国"}
print(f"①f3()my_set:{my_set}地址是:{id(my_set)}")
#调用函数
f3(my_set)
print(f"④f3()my_set:{my_set}地址是:{id(my_set)}")

def f4(my_dict):
    print(f"②f4() my_dict:{my_dict}地址是:{id(my_dict)}")
    # 添加数据
    my_dict['address'] = "兰若寺"
    print(f"③f4()my_dict:{my_dict}地址是:{id(my_dict)}")

my_dict = {"name" : "小倩" , "age" : 18}
print(f"①f3()my_dict:{my_dict}地址是:{id(my_dict)}")
#调用函数
f4(my_dict)
print(f"④f3()my_dict:{my_dict}地址是:{id(my_dict)}")